
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
            Scanner scanner = new Scanner(System.in);
            long x1 = scanner.nextInt();
            long k1 = scanner.nextInt();
            long x2 = scanner.nextInt();
            long k2 = scanner.nextInt();
            long v1 = repeat(x1, k1);
            long v2 = repeat(x2, k2);
           if(v1 < v2){
               System.out.println("Less");
           }else if(v1 == v2){
               System.out.println("Equal");
           }else {
               System.out.println("Greater");
           }
    }
               public static long repeat(long j, long m) {
                        int count = 1;
                        long k = j;
                        while (j > 1) {
                            j /= 10;
                            count++;
                        }
                        long scan = 0L;
                        while (m > 0) {
                            scan = scan * (long) Math.pow(10, count) + k;
                            m--;
                        }
                        j = scan;
                    return j;
                }
            }





